grammar Data;

file:   group+ ;
group:  INT sequence[$INT.int];
sequence[int n]
locals [int i = 1;]
//        match n integers
    :   ( {$i<=$n}? INT {$i++;} )*
    ;

INT:    [0-9]+;
WS:     [ \r\t\n]+ -> skip;